// compile:
// run:
#include <iostream>

using namespace std;

#if defined(__GNUC__) || defined(__GNUG__)
#define ONEBYTE_ALIGN __attribute__((packed))
#elif defined(_MSC_VER)
#define ONEBYTE_ALIGN
#pragma pack(push, 1)
#endif

void Test1() {
  struct Point {
    int a;
    char b;
  } p;

  cout << alignof(p) << endl;
  cout << sizeof(p) << endl;

  // #pragma pack(push)
  // #pragma pack(1)
  //   struct Point2 {
  //     int a;
  //     char b;
  //   } p2;
  // #pragma pop(pop)

  //   cout << alignof(p2) << endl;
  //   cout << sizeof(p2) << endl;
}
#if defined(__GNUC__) || defined(__GNUG__)
#undef ONEBYTE_ALIGN
#elif defined(_MSC_VER)
#pragma pack(pop)
#undef ONEBYTE_ALIGN
#endif
void Test2() {}
int main() {
  Test1();
  Test2();
  return 0;
}
